package com.oglvip.business.util;

import org.springframework.security.authentication.encoding.Md5PasswordEncoder;

/**
 * @auther hanchao
 * @date 2016/12/13 13:12
 */
public class EncryptUtil {
    private static Md5PasswordEncoder md5PasswordEncoder = new Md5PasswordEncoder();

    public static String md5Encrypt(String password){
        return md5PasswordEncoder.encodePassword(password,null);
    }

    public static String md5Encrypt(String password,Object salt){
        return md5PasswordEncoder.encodePassword(password,salt);
    }
}
